package com.dxysun.springboot;

import org.springframework.expression.Expression;
import org.springframework.expression.ExpressionParser;
import org.springframework.expression.spel.standard.SpelExpressionParser;

public class Main
{
	public static void main(String[] args)
	{
		ExpressionParser parser = new SpelExpressionParser();
		Expression expression = parser.parseExpression("100*2+400*1+66");
		int result = (Integer) expression.getValue();
		System.out.println("计算结果是" + result);
	}
}
